package com.sirdc.modules.paas.api.mt;

import java.util.Map;

import com.sirdc.modules.paas.api.common.CommonResponse;
import com.sirdc.modules.paas.api.common.Constants;

/**
 * 短信发送请求返回类.
 * 
 * @author Qing
 * @e-mail lhq@suncco.com
 * @version v1.0
 * @copyright 2010-2015
 * @create-time 2013-9-18 下午5:39:21
 * 
 */
public class MtResponse extends CommonResponse {

    private static final long serialVersionUID = 1288875327293685629L;

    private static final String MTAMOUNT = "mtAmount";

    /**
     * 成功提交发送的短信条数.
     */
    private String mtAmount;

    /**
     * 解析请求返回的xml数据,设置返回对象的属性值.
     * 
     * @param xmlStr 请求返回的xml字符串.
     */
    public MtResponse(String xmlStr) {
        Map<String, String> map = super.getMapByXmlStr(xmlStr);
        if (map.containsKey(Constants.STATECODE)) {
            this.stateCode = map.get(Constants.STATECODE);
        }
        if (map.containsKey(Constants.STATEINTRO)) {
            this.stateIntro = map.get(Constants.STATEINTRO);
        }
        if (map.containsKey(MTAMOUNT)) {
            this.mtAmount = map.get(MTAMOUNT);
        }
    }

    public String getMtAmount() {
        return mtAmount;
    }

    public void setMtAmount(String mtAmount) {
        this.mtAmount = mtAmount;
    }

}
